package com.adingxiong.pm.config;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 定义全局异常处理
 */
@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(Exception.class)
    public String ex(Exception e) {
        return e.getMessage();
    }
}
